import { HashMap } from "../../api/struct/HashMap";
import { CDDropSet } from "../excel/CDDropSet";

/**
 * 扩展-掉落特殊设定
 */
export abstract class CEDropSet {

    /**数据 每组的配置队列*/
    public static datas = new HashMap<number, CDDropSet[]>();


    /**初始化 */
    public static init(): void {
        const vs = CDDropSet.datas.getValues();
        for (let i = 0, len = vs.length; i < len; i++) {
            let list = this.datas.get(vs[i].DropSetid);
            if (!list) {
                list = [];
                this.datas.put(vs[i].DropSetid, list);
            }
            list.push(vs[i]);
        }
    }


    /** 获取数据*/
    public static getData(chooseID: number): CDDropSet[] {
        return this.datas ? this.datas.get(chooseID) : null;
    }
}